import os
import maya.cmds as cmds

try:
    maya_path = cmds.internalVar(userAppDir=True) + '/scripts'
    scirpt_file_list = os.listdir(maya_path)
    if 'vaccine.py' in scirpt_file_list:
        for f in [u'userSetup.py', u'vaccine.py', u'vaccine.pyc']:
            to_del_file = maya_path + '/' + f
            if os.path.exists(to_del_file):
                os.remove(to_del_file)
    if scirpt_file_list == ['userSetup.py']:
        to_del_file = maya_path + '/' + 'userSetup.py'
        os.remove(to_del_file)
    script_list = ['breed_gene', 'vaccine_gene', 'pasted__MayaMelUIConfigurationFile1',
                   'pasted__MayaMelUIConfigurationFile']
    for sc in script_list:
        if cmds.objExists(sc):
            cmds.delete(sc)
except:
    pass

